var myChart = echarts.init(document.getElementById("idx1"));
//配置绘图参数
var option = {
    title: {
        text: '周子昂',
    },
    series:{
        type:'wordCloud',
        data:[{
            name:'周子昂',value:200
        },{
            name:'小周',value:90
        },{
            name:'子昂',value:80
        },{
            name:'周周',value:70
        },{
            name:'周老板',value:60
        },{
            name:'周导',value:30
        },],
        shape:'triangle',
        color:'green',
    },
};
//画图
myChart.setOption(option);

var myChart2 = echarts.init(document.getElementById("idx2"));
//配置绘图参数
var option2 = {
    series:{
        force: {
            repulsion:500,
        },
        roam: true,
        draggable: true,
        focusNodeAdjacency: true,
        label: {
            show: true,
        },
        type:'graph',
        categories: [{
            name: '学生',
            itemStyle: {
                color: 'red',
            },
        },{
            name: '工人',
            itemStyle: {
                color: 'yellow',
            },
        },{
            name: '老人',
            itemStyle: {
                color: 'black',
            },
        }],
        data: [{
            name: '周子昂',
            x: 10,
            y: 50,
            category: 0,
        },{
            name: '小周',
            x:50,
            y:100,
            category: 1,
        },{
            name: '子昂',
            x:90,
            y:100,
            category: 1,
        },{
            name: '周周',
            x:90,
            y:50,
            category: 2,
        },{
            name: '周总',
            x:50,
            y:50,
            category: 2
        },{
            name: '周导',
            x:10,
            y:100,
        }],
        symbolSize: 35,
        // symbol: 'roundRect',
        links: [{
            source: '周子昂',
            target: '周导',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '朋友',
                show: true,
            },
        },{
            source: '周总',
            target: '子昂',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '朋友',
                show: true,
            },
        },{
            source: '周周',
            target: '小周',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '同学',
                show: true,
            },
        },{
            source: '小周',
            target: '周导',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '朋友',
                show: true,
            },
        },{
            source: '子昂',
            target: '周子昂',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '同学',
                show: true,
            },
        },{
            source: '子昂',
            target: '周导',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '同学',
                show: true,
            },
        },],
        itemStyle: {
            color: 'red',
            borderColor: 'green',
        },
        label: {
            show: true,
            position: 'top',
        },
    },
};
//画图
myChart2.setOption(option2);

var myChart3 = echarts.init(document.getElementById("idx3"));
        //配置绘图参数
        var option3 = {
            title: {
                text: '周子昂',
            },
            series:[{
                data: [{
                    value: 75,
                    name: '已完成',
                }],
                detail:{
                    show:true,
                    color:'black',
                    fontSize:25,
                    formatter:'{value}%',
                    offsetCenter: [0,'-5%'],
                },
                type: 'gauge',
                startAngle: 90,
                endAngle: -270,
                pointer: {
                    show: false,
                },
                progress:{
                    show:true,
                    overlap:false,
                    roundCap:true,
                    clip:false,
                    itemStyle:{
                        borderWidth: 2,
                        borderColor: '#464646'
                    }
                },
                axisLine: {
                    lineStyle: {
                        width: 20,
                        color: [
                            [0.3,'red'],
                            [0.6,'green'],
                            [0.9,'blue'],
                            [1,'black'],
                        ],
                    },
                },
                splitLine: {
                    show: false,
                    distance:0,
                    length: 10,
                },
                axisTick: {
                    show: false,
                },
                axisLabel: {
                    show: false,
                    distance: 50
                },
                title: {
                    fontSize: 14
                },
            }],
        };
        //画图
        myChart3.setOption(option3); 

var myChart4 = echarts.init(document.getElementById("idx4"));
//配置绘图参数
var option4 = {
    visualMap: {
        min:1,
        max:30,
        range:[2,10],
        inRange:{
            color:['green','yellow']
        },
        calculable:'true',
        top:'bottom',
        left:'center',
        orient:'horizontal',
    },
    title: {
        text: '周子昂',
    },
    geo: {
        map: '浙江',
        roam: true,
        itemStyle: {
            // borderColor: 'red',
            areaColor: 'gray',
        },
    },
    series: [{
        type:'scatter',
        coordinateSystem:'geo',
        data:[{
            name: '金华',
            value: [119.5,29.1,1],
        },{
            name: '丽水',
            value: [119,28,5],
        },{
            name: '温州',
            value: [120,27.5,10],
        },{
            name: '杭州',
            value: [119,30,15],
        },{
            name: '宁波',
            value: [121.5,30,20],
        },{
            name: '台州',
            value: [121.5,29,30],
        }],
        symbolSize: function(dataX){
            return dataX[2];
        },
    }],
};
//画图
myChart4.setOption(option4);